package com.firstcare.android_dylibrary.bean;

import com.firstcare.android_dylibrary.bean.base.BaseModelProxy;
import com.litesuits.orm.db.assit.QueryBuilder;

import java.util.List;

/**
 * Created by chenyichao on 2016/8/30.
 */
public class SaveImageProxy extends BaseModelProxy<SaveImage> {
    public  SaveImageProxy(){
    }
    public static long saveImage(SaveImage saveImage){
        long  index= SaveImageProxy.getDB().save(saveImage);
        return  index;
    }
    public static List<SaveImage> queryList(String userid) {
        QueryBuilder<SaveImage> qb = new QueryBuilder<SaveImage>(SaveImage.class).where("userid" + "=?", new String[]{userid}); //where条件
        List<SaveImage> list = SaveImageProxy.getDB().query(qb);
        return list;
    }
    public static void deleteSaveImage(SaveImage saveImage){
        SaveImageProxy.getDB().delete(saveImage);
    }
}
